# 演示使用构造方法对成员变量进行赋值
# 构造方法的名称： __init__

class Student:
    name = None
    age = None
    tel = None

    def __init__(self, name, age, tel):
        self.name = name
        self.age = age
        self.tel = tel
        print(f"名字为：{self.name}, 年龄为：{self.age}, 电话为：{self.tel}")

stu1 = Student("张三", 20, "18679772038")
print(stu1.name)
print(stu1.age)
print(stu1.tel)

